package br.xraylol.client;

import org.springframework.stereotype.Component;

import br.xraylol.bean.riot.ChampionBean;
import br.xraylol.bean.riot.ItemBean;
import br.xraylol.bean.riot.MasteryBean;
import br.xraylol.bean.riot.RealmBean;
import br.xraylol.bean.riot.RuneBean;
import br.xraylol.bean.riot.SummonerSpellBean;
import br.xraylol.constant.ServiceType;
import br.xraylol.custom.list.ChampionList;
import br.xraylol.custom.list.ItemList;
import br.xraylol.custom.list.MasteryList;
import br.xraylol.custom.list.RuneList;
import br.xraylol.custom.list.SummonerSpellList;

@Component
public class LolStaticDataClient extends GenericClient {
	
	public LolStaticDataClient() {
		super(ServiceType.LOL_STATIC_DATA);
	}
	
	public ChampionList findChampions() {
		return findAll("/champion?champData=all", ChampionList.class, true);
	}
	
	public ChampionBean findChampionById(Long id) {
		return findAll("/champion/" + id + "?champData=all", ChampionBean.class, true);
	}
	
	public ItemList findItems() {
		return findAll("/item?itemListData=all", ItemList.class, true);
	}
	
	public ItemBean findItemById(Long id) {
		return findAll("/item/" + id + "?itemData=all", ItemBean.class, true);
	}
	
	public MasteryList findMasteries() {
		return findAll("/mastery?masteryListData=all", MasteryList.class, true);
	}
	
	public MasteryBean findMasteryById(Long id) {
		return findAll("/mastery/" + id + "?masteryData=all", MasteryBean.class, true);
	}
	
	public RealmBean findRealm() {
		return findAll("/realm", RealmBean.class);
	}
	
	public RuneList findRunes() {
		return findAll("/rune?runeListData=all", RuneList.class, true);
	}
	
	public RuneBean findRuneById(Long id) {
		return findAll("/rune/" + id + "?runeData=all", RuneBean.class, true);
	}
	
	public SummonerSpellList findSummonersSpell() {
		return findAll("/summoner-spell?spellData=all", SummonerSpellList.class, true);
	}
	
	public SummonerSpellBean findSummonerSpellById(Long id) {
		return findAll("/summoner-spell/" + id + "?spellData=all", SummonerSpellBean.class, true);
	}
}
